package com.wang.utils;

public enum ResponseEnum {
    // 和用户有关的状态 10xx开头

    USER_ALL_SUCCESS(1001,"查询所有用户成功"),
    USER_ID_SUCCESS(1002,"根据id查询所有用户成功"),
    USER_ADD_SUCCESS(1003,"添加用户信息成功"),
    USER_ADD_FAILURE(1004,"添加用户信息失败"),
    // 前台用户登录
    USER_API_LOGIN_1(1005,"用户名不存在"),
    USER_API_LOGIN_2(1006,"用户名存在，密码不正确"),
    USER_API_LOGIN_3(1007,"用户名和密码匹配，角色不正确"),
    USER_API_LOGIN_4(1008,"前台登录成功"),
    USER_API_GET_CURRENT_INFO(1009,"获取当前用户的信息成功"),
    USER_API_LOGOUT_SUCCESS(1010,"用户注销成功"),
    USER_API_LOGIN_ERROR_ROLE(1011,"用户不是管理员"),
    USER_ADMIN_LOGIN_SUCCESS(1012,"管理员登录成功"),
    USER_FIND_SUCCESS(1013,"查询所有用户成功"),
    // 短信有关的状态 20xx
    SMS_VERIFY_4_CODE_SUCCESS(2001,"发送4位验证码成功"),
    SMS_VERIFY_4_CODE_NOT_IN_REDIS(2002,"验证码无效"),
    SMS_VERIFY_4_CODE_NOT_MATCH(2003,"验证码不匹配"),
    // SMS_VERIFY_4_CODE_VERIFY_SUCCESS(2004,"验证码校验成功"),

    // 购物车的状态30xx开头
    CART_FIND_COUNT(3001,"获取购物车数量成功"),
    CART_FIND_COUNT_FAILURE(3002,"用户未登录，不能获取购物车"),
    CART_FIND_CART_INFO(3003,"获取购物车详细信息成功"),
    CART_UPDATE_CART_SUCCESS(3004,"更新购物车状态成功"),
    CART_UPDATE_CART_FAILURE(3005,"更新购物车状态失败"),
    CART_DELETE_CART_SUCCESS(3006,"删除购物车状态成功"),
    CART_DELETE_CART_FAILURE(3007,"删除购物车状态失败"),

    // 支付信息
    PAY_INFO_FINDALL_SUCCESS(4001,"查询所有支付信息成功")
    ;
    private Integer code;
    private String msg;

    ResponseEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
